<script setup>
defineProps({
  message: Object,
  isCurrentUser: Boolean,
  time: String
});
</script>

<template>
  <div
      class="message"
      :class="isCurrentUser ? 'received' : 'sent'"
  >
    <div class="message-content">{{ message.content }}</div>
    <div class="message-time">{{ time }}</div>
  </div>
</template>

<style scoped>
/* 样式已在全局chat.css中定义 */
@import '@/assets/chat.css';
</style>
